﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharedLib.BasicServices.MessageFramework;

namespace Tracy.BasicServices
{
    public class TracyMessageDispatcher:MessageDispatcher
    {
        public event EventHandler<NotifyUIEventArgs> OnNotifyUI;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="source"></param>
        /// <param name="eventType">See Constants in NotifyUIEventArgs for available eventTypes</param>
        /// <param name="param"></param>
        public void NotifyUI(IAppMessage source, string eventType, object param)
        {
            if (OnNotifyUI != null)
            {
                OnNotifyUI(this, new NotifyUIEventArgs() { Source = source, EventType = eventType, Param = param });
            }
        }
    }
}
